import math

a,b=0.3,0.8

def fun(x):
    return x*math.exp(x)-1




def fi(x0,x1):
    return x1-fun(x1)*(x1-x0)/(fun(x1)-fun(x0))

def secant(x,last_x,max_times,error):
    cnt=0

    while 1==1:
        cnt+=1
        new_x = fi(last_x,x)
        if math.fabs(new_x-x)<error or cnt==max_times:
            break
        last_x=x
        x=new_x
    return new_x

print("%.3f"%secant(a,b,500,0.0001))


